"""
i = 0
numbers = []

while i < 6:
    print "At the top i is %d" % i
    numbers.append(i)

    i = i + 1
    print "Numbers now: ",numbers
    print "At the bottom i is %d" % i


print "The numbers: "

for num in numbers:
    print num
"""


"""
def xunhuan1(n,m):
    j = 0
    numbers = []
    while j < n:
        print "At the top is %d" % j
        numbers.append(j)
        j += m
        print "Numbers now: ",numbers
        print "At the bottom j is %d" % j
    print "The numbers: "
    for num in numbers:
        print num

xunhuan1(6,1)
"""

def xunhuan2(n,m):
    j = 0
    numbers = []
    for j in range(0,n):
        print "At the top is %d" % j
        numbers.append(j)
        j += m
        print "Numbers now: ",numbers
        print "At the bottom j is %d" % j
    print "The numbers: "
    for num in numbers:
        print num

xunhuan2(6,1)
